<template>
	<view>
		<view class="" v-if="listRounts && listRounts.length">
			<view class="" v-for="(itema,indea) in listRounts" :key="indea">
				<view class="inspecionTent" v-for="(item,index) in itema.listRecords" :key="index">
					<view class="masbhuwrubhf">
						<!-- 名称 -->
						<view class="tentlisgsg">
							<view class="aaa"></view>
							<view class="bbb"><text>{{item.testName}}</text></view>
						</view>
						<view class="tentlisqwe">
							<text>前</text>
							<text>后</text>
						</view>
					</view>

					<view class="inspecionOne">
						<view v-for="(itea,idex) in item.dateDetaile" :key="idex">
							<view class="aconFession">
								<view class="fessionText" >
									<text>{{itea.pieceName}}</text>
									<text>{{itea.pieceTestItem}}</text>
								</view>
								<view class="acdc" v-if="itea.pieceType==1 && itea.maintName!=''">
									<text>{{itea.maintName || ''}}</text>
								</view>
								<view class="acdc" v-if="itea.pieceType==2 && itea.mixMaintName!=''">
									<text>{{itea.mixMaintName || ''}}</text>
								</view>
							</view>
							<!-- 检测前后结果 -->
							<view class="testResults">
								<view><text>{{itea.pieceTestValue||''}}</text></view>
								<view><text>{{itea.pieceTestValueA || ''}}</text></view>
							</view>
						</view>
					</view>
				</view>
			</view>
		</view>
		<!-- 暂无数据 -->
		<view class="noneData" v-else>
			<image src="http://106.14.56.171:15016/images/images(4)(1)/images/noMessige.png" mode=""></image>
			<text>暂无数据...</text>
		</view>
	</view>
</template>

<script>
	export default {
		props: ["PrjInfoId"],
		data() {
			return {
				id: 0,
				listRounts: {},
				listRecord: {},
			}
		},
		created() {
			console.log(this.PrjInfoId);
			this.id = this.PrjInfoId
			this.inspecionListabc()
		},
		methods: {
			inspecionListabc() {
				this.$http.get(`api/EpoxyProject/GetPrjTestRecord?PrjInfoId=${this.id}`).then(res => {
					console.log('---------', res);
					this.listRounts = res
					res.forEach((el) => {
						// console.log('---------==========', el);
						this.listRecord = el.listRecords
					})
					// console.log('vsfughaes;thgslhlgsle', this.listRecord);

				})
			}
		}
	}
</script>

<style lang="less" scoped>
	// 头部 检测内容
	.inspecionTent {
		width: 96%;
		border-radius: 16rpx;
		background-color: #ffffff;
		margin: auto;
		margin-top: 18rpx;

		.masbhuwrubhf {
			padding: 20rpx 0 0 0;
			display: flex;
			align-items: center;
			justify-content: space-between;
		}

		.tentlisgsg {
			margin-left: 10rpx;
			width: 60%;
			font-size: 26rpx;
			display: flex;
			justify-content: space-around;
		}

		.tentlisqwe {
			width: 50%;
			display: flex;
			justify-content: space-around;
			font-size: 26rpx;
		}

		.inspecionOne {
			width: 100%;
			border-radius: 16rpx;

			>view {
				width: 100%;
				height: 77.5rpx;
				display: flex;
			}
		}
	}

	// 小红快儿
	.aaa {
		width: 12rpx;
		height: 28rpx;
		margin-top: 10rpx;
		background-color: #b5001e;
	}

	.bbb {
		width: 90%;
		line-height: 45rpx;
		// background-color: aqua;
	}

	.aconFession {
		width: 430rpx;
		display: flex;
		align-items: center;
		justify-content: space-between;
		// background-color: #D5E8F9;

		.fessionText {
			font-size: 26rpx;
			width: 70%;
			>text{
				margin-left: 13%;
			}
			>text:nth-child(2) {
				margin-left: 5rpx;
			}
		}
	}

	// 甲供
	.acdc {
		width: 100rpx;
		border: 1px solid #b5001e;
		border-radius: 50rpx;
		height: 30rpx;
		line-height: 25rpx;
		color: #b5001e;
		margin-right: 30rpx;
		text-align: center;
		padding: 5rpx 0 5rpx 0;
		transform: scale(0.7);

		>text {
			font-size: 22rpx;
		}
	}

	// 检测前后结果
	.testResults {
		display: flex;
		align-items: center;

		>view {
			width: 120rpx;
			height: 40rpx;
			text-align: center;
			font-size: 26rpx;
			line-height: 40rpx;
		}

		>view:nth-child(1) {
			background-color: #D5E8F9;
		}

		>view:nth-child(2) {
			margin-left: 20rpx;
			background-color: #F2F3D1;
		}
	}

	// 暂无数据
	.noneData {
		margin-top: 200rpx;
		display: flex;
		align-items: center;
		flex-direction: column;
		justify-content: space-around;

		>image {
			width: 200rpx;
			height: 200rpx;
		}

		>text {
			margin-top: 20rpx;
			font-size: 26rpx;
		}
	}
</style>
